package org.micro.rbac.core.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.micro.rbac.core.constant.Global;
import org.micro.rbac.core.valid.DateTime;

import java.io.Serial;

/**
 * @author hongsir
 * @apiNote 摘要:持久层入参,用户mapper查询
 * @since 2019-03-14 12:40
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class BaseQueryForm extends BaseBean {
    @Serial
    private static final long serialVersionUID = -5138460298353767452L;

    @Length(max = 50, message = "关键字最大长度为{max}")
    @Schema(description = "关键字")
    private String keyword;
    @Schema(description = "开始时间")
    @DateTime(message = "开始时间格式错误", format = {Global.DATE_FORMAT, Global.DATETIME_FORMAT, Global.SIMPLE_DATE_FORMAT})
    private String startTime;
    @Schema(description = "截止时间")
    @DateTime(message = "截止时间格式错误", format = {Global.DATE_FORMAT, Global.DATETIME_FORMAT, Global.SIMPLE_DATE_FORMAT})
    private String endTime;

}
